This pages is based on me collecting what I thought was the best options out of ((Magic Words Alternatives)).  The core is Cowan's version, which in turn uses xorxes' LTR processing idea.

! Magic Words

Magic words are all cmavo that have some interaction with words as words irrespective of the function of those words.  These are SI SA SU ZO ZOI LOhU LEhU ZEI BU and FAhO. (BAhE, even though it can modify any word, is not a magic word, because it doesn't affect the function of the word it modifies).

Many magic words convert the words they affect into a member of the special grammatical classes ''any-word'' and ''any-string''.  A member of one of these special grammatical classes has no selma'o for purposes of the rest of the Lojban grammar.

!!Meta-Rules

# Y+BU (i.e. &quot;.y. bu&quot;) is considered a single word of selma'o BU.  This conversion is done before any other processing of any kind.
# Magic words are processed left-to-right.
# Y is not a word (i.e. it is considered whitespace) for the purposes of these definitions.

!!Mini-Definitions

# __ZO__ binds with the following word.  The combination is considered a single word of the pseudo selma'o ''any-word'', except for SA matching purposes, where it retains the selma'o ZO.
# __LOhU__  turns all following Lojban words up to but not including a LEhU into words of the pseudo selma'o ''any-word''.
# __LEhU__ terminates a LOhU-quote. It is never elidable.
# __ZEI__ binds with the preceding word and the following word.  The combination is considered a single brivla (i.e. it is treated as just one word).
# __BU__ binds with the preceding word.  The combination is considered a single word of selma'o BY.
# __ZOI__ uses the following word as a delimiting word and binds with it and further text until the same word is repeated, inclusive of both delimiters.  Both delimiter words lose their grammatical function.  The combination is considered a single word of the pseudo selma'o ''any-string'', except for SA matching purposes, where it retains the selma'o ZOI.
# __SI__ erases the preceding word.  The construct becomes invisible to the rest of the text.
# __SA__ erases the preceding text back until it sees a word of the same selma'o as the word that follows SA, which replaces it. Words whose selma'o has been changed to ''any-word'' or ''any-string'' are invisible to SA for purposes to decided what to erase; they are erased as any other word would be.  If a word of the same selma'o is not found (which will ''always'' be the case with SI and SU), it erases back to the beginning of text.
# __SU__ erases all words back to the beginning of text. The construct becomes invisible to the rest of the text.
# __FAhO__ terminates the text, absorbing preceding words until the remaining text is grammatical. 

!! Marking Words

* __BAhE__ binds with and marks the following word but does not change its nature. The construct behaves just as the morked word by itself.  The two words are considered distinct for SA matching purposes, however.
* Attitudinals (__UI__ and __CAI__ cmavo) mark the previous word, quoted word, LOhU-quote, ZEI-lujvo, lerfu word, or ZOI-phrase, but do not change its nature. Attitudinals do not blend into a single word with the word they modify, but remain as separate words for the purposes of magic words that come after them.
* __DAhO__, __FUhE__, and __FUhO__ are the same as UI, but do not absorb a following NAI.

!! Examples

||
Subject Phrase | Result
broda .y. bu | The letter broda
zoi si stuff si | &quot;stuff&quot;
da zoi sa da joi de | Unclosed zoi
da zei fa'o | Lujvo of da and fa'o
lo'u co co zo le'u co le'u | Error (&quot;co le'u&quot; outside of quotes)
zoi si doi do | Uclosed zoi
zo da si | Nothing
zo da si si | Error (too many si)
da zei de bu | Letter da type of de
bu zei de | Error (nothing for bu to use)
zo bu zei de | &quot;bu&quot; type-of de
broda zei brode si brodi | brodi
zei zei zei | Error
da zei zei | da type-of zei
lo'u co co co le'u bu | The letter &quot;co co co&quot;
lo'u co co co le'u si bo le'u | Error (bare bo)
broda ba'e si | nothing (but emphatically!)
broda ba'e da si da | broda da
zo da bu | The letter &quot;da&quot;
zoi zoi That letter that you use between a user id and a host name in an e-mail address zoi bu | @
broda brode si bu | The letter broda
zoi zoi stuff zoi si | Nothing
zoi zoi lots of stuff zoi si si si si | Error (too many si)
zoi zoi lots of stuff zoi sa zoi si | Open zoi
||

Ignore everything past the bar below, please.

------

! Special SI and SA Cases

SI gets very complicated in a few cases, so here we go.  Some SA notes here too.

* SI has no effect inside LOhU...LEhU or after ZO (or inside a ZOI quote, of course).
* Multiple SI erase back through more words, rather than operating on themselves or something.  Duh.
* SI is valid at the beginning of input, but only to deal with the fact computer parsing is often done line by line, and two lines can be from the same speaker (e.g. &quot;mi broda co&quot; followed later by &quot;si do&quot;).
* SA+SI == nothing.
* SU+SI == nothing.
* SA+any word (except ZO)+SI == nothing (assuming that the SA is valid, i.e. that there is a word of the same selma'o as the word after SA to erase back to).  For ZO you need two SI.
** Not quite true; doesn't work for ZO or (probably) ZOI.
* ZO+any word+SI == ZO
* ZO+any word+SI+SI == nothing
* SI has no effect in a LOhU...LEhU even though ZO+LEhU does, so you can't do ZO+LEhU+SI+SI inside a LOhU...LEhU quote to get nothing.
* A SI immediately after the terminating LEhU of a LOhU...LEhU quote erases the LEhU, opening up the quote again.  A string of SI in that position keeps erasing through the quote, possibly destroying it entirely (although SA+LOhU+SI is normally a much better way of accomplishing this goal).  As soon as a non-SI word interrupts the string of SI after the terminating LEhU, that word and all other words until the next unquoted LEhU are considered part of the quote again, and have no grammatical function.
* SA can destroy LOhU...LEhU quotes, of course.  LOhU...LEhU+SA+LOhU, in particular, is exactly equivalent to just LOhU (hence, the quote is re-opened).  SA cannot erase to any other word in a LOhU...LEhU quote (because they are not considered part of any selma'o) except for ZO if a ZO+LEhU quote is used inside the LOhU...LEhU quote (because the ZO is used grammatically in this case, and hence has a selma'o in practice).
* SI can back into a ZOI quote in the same manner as into a LOhU...LEhU quote, except that all of the quoted non-Lojban text (which is considered non-Lojban text even if it clearly is) is treated as one word.  So:
** ZOI+delimiter+text+delimiter+SI == ZOI+delimiter+text
** ZOI+delimiter+text+delimiter+SI+SI == ZOI+delimiter
** ZOI+delimiter+text+delimiter+SI+SI+SI == ZOI
** ZOI+delimiter+text+delimiter+SI+SI+SI+SI == nothing
* As a result of the above, if you really want to destroy a whole ZOI quote, SA+ZOI+SI is strongly reccomended.
* ZOI+SI == nothing (i.e. if you haven't presented a delimiter yet, SI can still operate).
* ZOI + SA + ZOI + SI still == nothing.

! Error Cases

The following cases are explicitely defined as bad, i.e. error cases.

* ZO + any word + BU
* ZOI+delimiter+text+delimiter + BU
* ZEI + ZEI
* BAhE + end of text
* start of text + BU

! Non-Error Cases

Cases that are degenerate and strange, but not errors.

* BU + ZEI + BU
* BAhE + ZOI -- ZOI retains its usual meaning
* BAhE + ZO -- ZO retains its usual meaning
* DAhO (and friends) + NAI + ZEI + any word

